package cn.sxjzit.officlal.service.impl;

import cn.sxjzit.officlal.entity.Banner;
import cn.sxjzit.officlal.mapper.BannerMapper;
import cn.sxjzit.officlal.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BannerServiceImpl implements BannerService {
    @Autowired
    BannerMapper bannerMapper;
    @Override
    public boolean update(Banner banner) {
        return bannerMapper.update(banner);
    }

    @Override
    public List<Banner> findAll() {
        return bannerMapper.selectAllBanner();
    }

    @Override
    public Banner addBanner(Banner banner) {
        return bannerMapper.addBanner(banner);
    }

    @Override
    public boolean deleteBanner(int id) {
        return bannerMapper.deleteBanner(id);
    }
}
